package cn.hongwei.eduservice;

import com.baomidou.mybatisplus.core.injector.ISqlInjector;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author Great
 * @email 1224028994@qq.com
 */
@SpringBootApplication
@MapperScan("cn.hongwei.eduservice.mapper")
@ComponentScan("cn.hongwei")
@EnableDiscoveryClient
@EnableFeignClients
//@EnableTransactionManagement
public class EduTeacherServiceBoot8001 {
    public static void main(String[] args) {
        SpringApplication.run(EduTeacherServiceBoot8001.class,args);
    }

    //注入分页拦截器到容器中
    @Bean
    public PaginationInterceptor paginationInterceptor(){
        return new PaginationInterceptor();
    }
}
